package gwt.common.client;

import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.Label;

public class CNBase {
	public Label lGmail = new Label();
	public Label  nicknameLabel = new Label();	
	public Anchor signAnchor = new Anchor("Sign in", "");	
	
	public HorizontalPanel createHead() {
		Image img = new Image("images/coonay.jpg");
				
		Anchor aWriteWeb = new Anchor("WriteWeb",
				"http://sites.google.com/site/flankw/", "new");

		HorizontalPanel navPanel = new HorizontalPanel();
		navPanel.setSpacing(18);
		navPanel.add(lGmail);
		nicknameLabel.setVisible(false);
		navPanel.add(nicknameLabel);
		
		Label l = new Label("|");
		navPanel.add(l);
		navPanel.add(aWriteWeb);
		l = new Label("|");
		navPanel.add(l);
		navPanel.add(signAnchor);

		HorizontalPanel headerPanel = new HorizontalPanel();
		headerPanel.add(img);
		headerPanel.setCellHorizontalAlignment(img, HorizontalPanel.ALIGN_LEFT);
		headerPanel.add(navPanel);
		headerPanel.setCellHorizontalAlignment(navPanel,
				HorizontalPanel.ALIGN_RIGHT);
		headerPanel.setWidth("100%");
		return headerPanel;
	}
	
	
	
	public HorizontalPanel createFoot() {
		HTML f = new HTML(
				"<hr/>International Coonay:<a href=\"/\">North America</a> - E.U. - China - Korea</a><br>@2009 Coonay<a href=\"/\">Home</a> - <a href=\"/help\">Help</a> - <a href=\"/\">Contact</a>");

		HorizontalPanel footPanel = new HorizontalPanel();
		f.setHorizontalAlignment(HorizontalPanel.ALIGN_CENTER);
		footPanel.add(f);
		footPanel.setWidth("100%");
		return footPanel;

	}
	
	private void createDebug(HorizontalPanel headerPanel) {
		

		
	}

	
}
